Trend-following Microprofit w/ Smart DCA + Profit Plot + AlertsThis alert script is oriented towards automated trading with Gunbot.
I call it "Options Galore" because of all the user-configurable settings it offers for up-trending and down-trending markets. (See: " Market Tone " study).
A strategy script for quantitative backtesting, smarter buy/sell indicator such as TSI or Stoch RSI, and stop loss/trailing stop are all in the pipeline. Please share any other suggestions in the comments!
Features:
Set backtesting range, or start forward testing from the current time. Historical Renko charts can lead to repainting, which is avoided by keeping the chart open in your browser and running with real time data.
Average protection: only buy if price drops by a certain % below your average price -- can be automatically toggled by market trender if we want to continue buying during an uptrend. This reduces net profit but increases gross profit.
Gain protection: only sell if price is a certain % above your average price -- can be automatically toggled by market trender. Wait for larger profits in an uptrend, but sell earlier in a down trend.
Minimum percent gain can also be set to a negative value to allow selling at a loss. This is not true stop loss behavior, we still need a sell signal from the indicator. This means we will try to get the best price above your price floor, but in some rare situations we may not sell before the price drops below your price floor.
Position plotter: plots average long position price relative to current price.
Plot loss level: plots average price - loss %. With pyramiding turned off, this can be used to find out where to set your stop loss.
This script is free to use, just comment or PM for access. It is mainly meant to showcase some new features, and is only safe to use in carefully selected markets such as USDT-BTC.
Stay posted for upcoming scripts with smarter signaling and additional features! If you would like to add these features to your own preferred strategy, please PM me.
Cerca negli script per "Buy sell"
Gunbot MACDgenOk this is just some strat based on MACD, checking for a few conditions until giving buy/sell signals to Gunbot via alerts.
It is generalized but if you want to go play with the values. I will continue to develop this further and am happy to receive feedback.
Notations are coming.
Usage notes:
-ONLY use this with TV_GAIN: 0.6 because on downtrends it is supposed to double up to pull down the average bought price!
-Use "buying condition" and "selling condition" for alerts, trigger on close and I suggest you use 3 min intervals but try what looks good to you
-Use this on pairs that are curvy and have atleast 0.6% gain between buy/sell triggers. This is also general advise when you want to take microprofits.
-Don't be confused with sell arrows, it will only trigger the bot sell on gain when you've set TV_GAIN
Magic CirclesMagic Circles give buy and sell signals. Works best at trending markets. When using lower time frames, it is beneficial to confirm the signals with a 4H chart.
Stock Market Trend Analysis Trading System 101 (by ChartArt)This is a very simple trading system which is measuring the core of uptrends and downtrends using three basic elements: Close price, HL2 price, Pivot price.
Depending if the uptrend or downtrend is strong, the buy/sell signals are shown in different colors. The stronger trends are in brighter colors (lime and fuchsia). If the trend just fully changed direction from uptrend to downtrend (or vice versa), there is a background color highlight in the color of the new trend direction.
The trend detection should work best on monthly charts. I have created this in under an hour. My goal was to use the least amount of rules possible, therefore there are many false signals and the code is quite lazy.
You can lose all your money if you rely on these buy/sell signals!
Scalp EA for 15 Minute Timeframes and HigherSo I have written this indicator based upon the percentages of the High and the Low of the candlestick with respect to the open price. This indicator by no means tries to find top's and bottom's;however, it does find good opportunities for 5-20 pips reversals or continuations. The signal is provided without delay and should only be based upon the closing of the candle. For example, at open- the indicator will tell you "buy, sell, or remain flat" but you should only buy or sell when the candle has completely closed.
Choose whether to use it for scalps, or to set up larger trades with bigger time frames and support or resistance zones.
*Warning*- This is untested and will remain untested due my unavailability.
Reason behind the coding: As I trader, I like to think that I am always "buying low and selling high"or "selling high and buying low". Throughout my trading experiences, I can tell you that I have done the opposite many times. This indicator helps me in finding opportunities as I have written it to always Sell at the closing price of a green candle and always to buy at the close of a red candle. The indicator makes the attempt to Sell High and Buy Low.
MACD Full [Titans_Invest]MACD Full — A Smarter, More Flexible MACD.
Looking for a MACD with real customization power?
We present one of the most complete public MACD indicators available on TradingView.
It maintains the classic MACD structure but is enhanced with 20 fully customizable long entry conditions and 20 short entry conditions , giving you precise control over your strategy.
Plus, it’s fully automation-ready, making it ideal for quantitative systems and algorithmic trading.
Whether you're a discretionary trader or a bot developer, this tool is built to seamlessly adapt to your style.
⯁ WHAT IS THE MACD❓
The Moving Average Convergence Divergence (MACD) is a technical analysis indicator developed by Gerald Appel. It measures the relationship between two moving averages of a security’s price to identify changes in momentum, direction, and strength of a trend. The MACD is composed of three components: the MACD line, the signal line, and the histogram.
⯁ HOW TO USE THE MACD❓
The MACD is calculated by subtracting the 26-period Exponential Moving Average (EMA) from the 12-period EMA. A 9-period EMA of the MACD line, called the signal line, is then plotted on top of the MACD line. The MACD histogram represents the difference between the MACD line and the signal line.
Here are the primary signals generated by the MACD:
Bullish Crossover: When the MACD line crosses above the signal line, indicating a potential buy signal.
Bearish Crossover: When the MACD line crosses below the signal line, indicating a potential sell signal.
Divergence: When the price of the security diverges from the MACD, suggesting a potential reversal.
Overbought/Oversold Conditions: Indicated by the MACD line moving far away from the signal line, though this is less common than in oscillators like the RSI.
⯁ ENTRY CONDITIONS
The conditions below are fully flexible and allow for complete customization of the signal.
______________________________________________________
🔹 CONDITIONS TO BUY 📈
______________________________________________________
• Signal Validity: The signal will remain valid for X bars .
• Signal Sequence: Configurable as AND or OR .
🔹 MACD > Signal Smoothing
🔹 MACD < Signal Smoothing
🔹 Histogram > 0
🔹 Histogram < 0
🔹 Histogram Positive
🔹 Histogram Negative
🔹 MACD > 0
🔹 MACD < 0
🔹 Signal > 0
🔹 Signal < 0
🔹 MACD > Histogram
🔹 MACD < Histogram
🔹 Signal > Histogram
🔹 Signal < Histogram
🔹 MACD (Crossover) Signal
🔹 MACD (Crossunder) Signal
🔹 MACD (Crossover) 0
🔹 MACD (Crossunder) 0
🔹 Signal (Crossover) 0
🔹 Signal (Crossunder) 0
______________________________________________________
______________________________________________________
🔸 CONDITIONS TO SELL 📉
______________________________________________________
• Signal Validity: The signal will remain valid for X bars .
• Signal Sequence: Configurable as AND or OR .
🔸 MACD > Signal Smoothing
🔸 MACD < Signal Smoothing
🔸 Histogram > 0
🔸 Histogram < 0
🔸 Histogram Positive
🔸 Histogram Negative
🔸 MACD > 0
🔸 MACD < 0
🔸 Signal > 0
🔸 Signal < 0
🔸 MACD > Histogram
🔸 MACD < Histogram
🔸 Signal > Histogram
🔸 Signal < Histogram
🔸 MACD (Crossover) Signal
🔸 MACD (Crossunder) Signal
🔸 MACD (Crossover) 0
🔸 MACD (Crossunder) 0
🔸 Signal (Crossover) 0
🔸 Signal (Crossunder) 0
______________________________________________________
______________________________________________________
🤖 AUTOMATION 🤖
• You can automate the BUY and SELL signals of this indicator.
______________________________________________________
______________________________________________________
⯁ UNIQUE FEATURES
______________________________________________________
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Condition Table: BUY/SELL
Condition Labels: BUY/SELL
Plot Labels in the Graph Above: BUY/SELL
Automate and Monitor Signals/Alerts: BUY/SELL
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Table of Conditions: BUY/SELL
Conditions Label: BUY/SELL
Plot Labels in the graph above: BUY/SELL
Automate & Monitor Signals/Alerts: BUY/SELL
______________________________________________________
📜 SCRIPT : MACD Full
🎴 Art by : @Titans_Invest & @DiFlip
👨💻 Dev by : @Titans_Invest & @DiFlip
🎑 Titans Invest — The Wizards Without Gloves 🧤
✨ Enjoy!
______________________________________________________
o Mission 🗺
• Inspire Traders to manifest Magic in the Market.
o Vision 𐓏
• To elevate collective Energy 𐓷𐓏
Gold Buy/Sell Signals with Engulfing & S&D ZonesTrade base on the Fast & Slow Moving Average. When the Fast MA line is below the candle, it is an uptrend to BUY. if Fast MA line is above the candle, it's time to SELL.
OBV + Momentum + DI+ Dashboard 📊 Script Description: OBV + Momentum + DI+ Dashboard
This custom TradingView indicator combines three powerful technical analysis tools—On-Balance Volume (OBV), Momentum (ROC), and Directional Movement Index (+DI)—into a single, easy-to-read dashboard.
🔍 Key Features:
✅ Buy & Sell Signals
Plots signals on the chart when multiple conditions align:
Buy Signal: Bullish candle + Rising OBV + Positive Momentum + Strong +DI
Sell Signal: Bearish candle + Falling OBV + Negative Momentum + Weak +DI
✅ Dashboard Panel (Top Center)
A real-time dashboard displays key market conditions:
Price Action (Bullish, Bearish, or Neutral)
OBV Trend (Rising, Falling, or Flat)
Momentum (Rising, Falling, or Flat)
+DI Strength (Strong, Weak, or Neutral)
✅ Visual Enhancements
Color-coded trends for quick interpretation.
Compact table view in the center top of the chart.
📈 Technical Indicators Used:
OBV (On-Balance Volume): Measures buying/selling pressure via volume.
Momentum (Rate of Change): Detects acceleration/deceleration in price movement.
+DI from DMI/ADX: Indicates the strength of the uptrend.
This tool is ideal for momentum traders, volume analysts, and those who prefer a confluence-based trading approach. Use it on any time frame or asset to help confirm entries and exits with greater confidence.
Smart Money Concepts [PF]What is SMC in Trading?
SMC stands for Smart Money Concepts — a trading methodology that focuses on understanding and following the actions of institutional traders, often referred to as "smart money" (e.g., banks, hedge funds, and large financial institutions).
Instead of relying on traditional indicators (like RSI or MACD), SMC aims to read price action and market structure to identify where institutions are likely placing or manipulating orders.
🔑 Key Concepts in SMC:
Order Blocks – Areas on the chart where institutions placed large buy or sell orders.
Liquidity – Zones where many retail stop-losses are placed; institutions often target these.
Break of Structure (BOS) – A market structure shift that suggests a potential trend reversal or continuation.
Mitigation – When price returns to an order block to "fill" or mitigate unfilled institutional orders.
Fair Value Gap (FVG) – Gaps between candles that show imbalances in buying/selling pressure.
Heikin-Ashi Mean Reversion Oscillator [Alpha Extract]The Heikin-Ashi Mean Reversion Oscillator combines the smoothing characteristics of Heikin-Ashi candlesticks with mean reversion analysis to create a powerful momentum oscillator. This indicator applies Heikin-Ashi transformation twice - first to price data and then to the oscillator itself - resulting in smoother signals while maintaining sensitivity to trend changes and potential reversal points.
🔶 CALCULATION
Heikin-Ashi Transformation: Converts regular OHLC data to smoothed Heikin-Ashi values
Component Analysis: Calculates trend strength, body deviation, and price deviation from mean
Oscillator Construction: Combines components with weighted formula (40% trend strength, 30% body deviation, 30% price deviation)
Double Smoothing: Applies EMA smoothing and second Heikin-Ashi transformation to oscillator values
Signal Generation: Identifies trend changes and crossover points with overbought/oversold levels
Formula:
HA Close = (Open + High + Low + Close) / 4
HA Open = (Previous HA Open + Previous HA Close) / 2
Trend Strength = Normalized consecutive HA candle direction
Body Deviation = (HA Body - Mean Body) / Mean Body * 100
Price Deviation = ((HA Close - Price Mean) / Price Mean * 100) / Standard Deviation * 25
Raw Oscillator = (Trend Strength * 0.4) + (Body Deviation * 0.3) + (Price Deviation * 0.3)
Final Oscillator = 50 + (EMA(Raw Oscillator) / 2)
🔶 DETAILS Visual Features:
Heikin-Ashi Candlesticks: Smoothed oscillator representation using HA transformation with vibrant teal/red coloring
Overbought/Oversold Zones: Horizontal lines at customizable levels (default 70/30) with background highlighting in extreme zones
Moving Averages: Optional fast and slow EMA overlays for additional trend confirmation
Signal Dashboard: Real-time table showing current oscillator status (Overbought/Oversold/Bullish/Bearish) and buy/sell signals
Reference Lines: Middle line at 50 (neutral), with 0 and 100 boundaries for range visualization
Interpretation:
Above 70: Overbought conditions, potential selling opportunity
Below 30: Oversold conditions, potential buying opportunity
Bullish HA Candles: Green/teal candles indicate upward momentum
Bearish HA Candles: Red candles indicate downward momentum
MA Crossovers: Fast EMA above slow EMA suggests bullish momentum, below suggests bearish momentum
Zone Exits: Price moving out of extreme zones (above 70 or below 30) often signals trend continuation
🔶 EXAMPLES
Mean Reversion Signals: When the oscillator reaches extreme levels (above 70 or below 30), it identifies potential reversal points where price may revert to the mean.
Example: Oscillator reaching 80+ levels during strong uptrends often precedes short-term pullbacks, providing profit-taking opportunities.
Trend Change Detection: The double Heikin-Ashi smoothing helps identify genuine trend changes while filtering out market noise.
Example: When oscillator HA candles change from red to teal after oversold readings, this confirms potential trend reversal from bearish to bullish.
Moving Average Confirmation: Fast and slow EMA crossovers on the oscillator provide additional confirmation of momentum shifts.
Example: Fast EMA crossing above slow EMA while oscillator is rising from oversold levels provides strong bullish confirmation signal.
Dashboard Signal Integration: The real-time dashboard combines oscillator status with directional signals for quick decision-making.
Example: Dashboard showing "Oversold" status with "BUY" signal when HA candles turn bullish provides clear entry timing.
🔶 SETTINGS
Customization Options:
Calculation: Oscillator period (default 14), smoothing factor (1-50, default 2)
Levels: Overbought threshold (50-100, default 70), oversold threshold (0-50, default 30)
Moving Averages: Toggle display, fast EMA length (default 9), slow EMA length (default 21)
Visual Enhancements: Show/hide signal dashboard, customizable table position
Alert Conditions: Oversold bounce, overbought reversal, bullish/bearish MA crossovers
The Heikin-Ashi Mean Reversion Oscillator provides traders with a sophisticated momentum tool that combines the smoothing benefits of Heikin-Ashi analysis with mean reversion principles. The double transformation process creates cleaner signals while the integrated dashboard and multiple confirmation methods help traders identify high-probability entry and exit points during both trending and ranging market conditions.
Buysell Martingale Signal - CustomBuysell Martingale Signal - Custom Indicator
Introduction:
This indicator provides a dynamic buy and sell signal system incorporating an adaptive Martingale logic. Built upon the signalLib_yashgode9/2 library, it is designed for use across various markets and timeframes.
Key Features:
Primary Buy & Sell Signals: Identifies initial buy and sell opportunities based on directional changes derived from the signalLib.
Martingale Signals:
For Short (Sell) Positions: A Martingale Sell signal is triggered when the price moves against the existing short position by a specified stepPercent from the last entry price, indicating a potential opportunity to average down or increase position size.
For Long (Buy) Positions: Similarly, a Martingale Buy signal is triggered when the price moves against the existing long position by a stepPercent from the last entry price.
On-Chart Labels: Displays clear, customizable labels on the chart for primary Buy, Sell, Martingale Buy, and Martingale Sell signals.
Customizable Colors: Allows users to set distinct colors for primary signals and Martingale signals for better visual distinction.
Adjustable Sensitivity: Features configurable parameters (DEPTH_ENGINE, DEVIATION_ENGINE, BACKSTEP_ENGINE) to fine-tune the sensitivity of the underlying signal generation.
Webhook Support (Static Message Alerts): This indicator provides alerts with static messages for both primary and Martingale buy/sell signals. These alerts can be leveraged for automation by external systems (such as trading bots or exchange-provided Webhook Signal Trading services).
Important Note: When using these alerts for automation, an external system is required to handle the complex Martingale logic and position management (e.g., tracking steps, PnL calculation, hedging, dynamic quantity sizing), as this indicator solely focuses on signal generation and sending predefined messages.
How to Use:
Add the indicator to your desired chart.
Adjust the input parameters in the indicator's settings to match your specific trading symbol and timeframe.
For automation, you can set up TradingView alerts for the Buy Signal (Main/Martingale) and Sell Signal (Main/Martingale) conditions, pointing them to your preferred Webhook URL.
Configurable Parameters:
DEPTH_ENGINE: (e.g., 30) Controls the depth of analysis for the signal algorithm.
DEVIATION_ENGINE: (e.g., 5) Defines the allowable deviation for signal generation.
BACKSTEP_ENGINE: (e.g., 5) Specifies the number of historical bars to look back.
Martingale Step Percent: (e.g., 0.5) The percentage price movement against the current position that triggers a Martingale signal.
Labels Transparency: Adjusts the transparency of the on-chart signal labels.
Buy-Color / Sell-Color: Sets the color for primary Buy and Sell signal labels.
Martingale Buy-Color / Martingale Sell-Color: Sets the color for Martingale Buy and Sell signal labels.
Label size: Controls the visual size of the labels.
Label Offset: Adjusts the vertical offset of the labels from the candlesticks.
Risk Warning:
Financial trading inherently carries significant risk. Martingale strategies are particularly high-risk and can lead to substantial losses or even complete liquidation of capital if the market moves strongly and persistently against your position. Always backtest thoroughly and practice with a demo account, fully understanding the associated risks, before engaging with real capital.
Dr Avinash Talele momentum indicaterTrend and Volatility Metrics
EMA10, EMA20, EMA50:
Show the percentage distance of the current price from the 10, 20, and 50-period Exponential Moving Averages.
Positive values indicate the price is above the moving average (bullish momentum).
Negative values indicate the price is below the moving average (bearish or corrective phase).
Use: Helps traders spot if a stock is extended or pulling back to support.
RVol (Relative Volume):
Compares current volume to the 20-day average.
Positive values mean higher-than-average trading activity (potential institutional interest).
Negative values mean lower activity (less conviction).
Use: High RVol often precedes strong moves.
ADR (Average Daily Range):
Shows the average daily price movement as a percentage.
Use: Higher ADR = more volatility = more trading opportunities.
50D Avg. Vol & 50D Avg. Vol ₹:
The 50-day average volume (in millions) and value traded (in crores).
Use: Confirms liquidity and suitability for larger trades.
ROC (Rate of Change) Section
1W, 1M, 3M, 6M, 12M:
Show the percentage price change over the last 1 week, 1 month, 3 months, 6 months, and 12 months.
Positive values (green) = uptrend, Negative values (red) = downtrend.
Use: Quickly see if the stock is gaining or losing momentum over different timeframes.
Momentum Section
1M, 3M, 6M:
Show the percentage gain from the lowest price in the last 1, 3, and 6 months.
Use: Measures how much the stock has bounced from recent lows, helping find strong rebounds or new leaders.
52-Week High/Low Section
From 52WH / From 52WL:
Show how far the current price is from its 52-week high and low, as a percentage.
Closer to 52WH = strong uptrend; Closer to 52WL = possible value or turnaround setup.
Use: Helps traders identify stocks breaking out to new highs or rebounding off lows.
U/D Ratio
U/D Ratio:
The ratio of up-volume to down-volume over the last 50 days.
Above 1 = more buying volume (bullish), Below 1 = more selling volume (bearish).
Use: Confirms accumulation or distribution.
How This Table Helps Analysts and Traders
Instant Trend Assessment:
With EMA distances and ROC, analysts can instantly see if the stock is trending, consolidating, or reversing.
Momentum Confirmation:
ROC and Momentum sections highlight stocks with strong recent moves, ideal for momentum and breakout traders.
Liquidity and Volatility Check:
Volume and ADR ensure the stock is tradable and has enough price movement to justify a trade.
Relative Positioning:
52-week high/low stats show whether the stock is near breakout levels or potential reversal zones.
Volume Confirmation:
RVol and U/D ratio help confirm if moves are backed by real buying/selling interest.
Actionable Insights:
By combining these metrics, traders can filter for stocks with strong trends, robust momentum, and institutional backing—ideal for swing, position, or even intraday trading.
Algo BOT 3.0Algo BOT 3.0 is a sophisticated, rule-based intraday trading strategy designed for index option traders who seek high-probability entries based on market structure, institutional zones, and controlled risk management. This strategy intelligently identifies BUY and SELL trade opportunities using price action, Fibonacci retracements, and pivot confluences, layered with dynamic trade management through trailing stop loss (TSL) and predefined profit/loss thresholds.
🔍 Strategic Foundation
Algo BOT 3.0 combines multiple proven intraday trading concepts into a single unified system:
Candle Behavior Analysis:
Detects strong green (bullish) and red (bearish) candles based on configurable range filters, wick/body ratios, and volume-backed movement.
Ensures only impactful candles are considered for signal generation, filtering out noise.
Dynamic Candle Range Filtering:
Filters out low-momentum candles by comparing their range against a dynamically calculated threshold (based on recent 30-minute close).
Prevents premature or weak entries by focusing on high-volatility structures.
Fibonacci Entry Zones:
Automatically calculates 0.382 and 0.618 Fibonacci levels between the most recent key candles (highest green & lowest red).
These fib levels are used to define entry zones for BUY (above red fib 0.382) and SELL (below green fib 0.382).
Optional fib zones can be visually shown on the chart with real-time drawing.
📈 Signal Generation Logic
The core BUY/SELL signals are triggered based on a combination of:
Green/Red Candle Identification:
A green candle qualifies if:
Open is near the bottom 38.2% of its range.
Close is above the top 61.8% of the range.
High is above a pivot or institutional level.
A red candle qualifies if:
Open is near the top 38.2% of its range.
Close is below the bottom 61.8% of the range.
Low is below a pivot or institutional level.
Support/Resistance Touch Confirmation:
Signals are only considered valid if the qualifying candle touches:
CPR Top/Bottom
Daily Pivot Points (PP, R1–R4, S1–S4)
VWAP or MVWAP
CE Entry (BOT BUY):
Occurs when the price crosses above red fib 0.382 after red candle touch at support.
PE Entry (BOT SELL):
Occurs when the price crosses below green fib 0.382 after green candle touch at resistance.
Signal Controls:
Only one active signal per type (BUY/SELL) at a time.
Real-time tracking of active trade with condition-based resets.
🎯 Exit Management
Built-in risk and profit control with dynamic logic:
Trailing Stop Loss (TSL):
TSL is dynamically adjusted based on peak price after entry.
Trail distance is customizable via input (% below peak).
Visual alerts notify when TSL is hit.
Profit Target:
Trade exits automatically when desired % profit is achieved from entry.
Loss Limit:
Trade exits immediately if unrealized loss exceeds a set % threshold.
Helps prevent large drawdowns during volatile market moves.
🧠 Technical Indicator Integration
To enhance trade accuracy, the strategy includes several optional filters:
RSI: Momentum confirmation or divergence filtering.
SMA/EMA: Trend direction confirmation.
MVWAP: Modified VWAP for smoother institutional bias tracking.
🖼️ Visuals & Alerts
BOT BUY and BOT SELL Signal Labels appear directly on the chart with trade type and candle reference.
TSL, Target, and SL Exits shown as label markers with optional background highlight.
Live Alerts:
BOT BUY (CE Entry)
BOT SELL (PE Entry)
Trailing Stop Loss Triggered
Profit Target Hit
Stop Loss Triggered
⚙️ Customizable Settings
Users can fine-tune the strategy using the following input options:
MVWAP Length
RSI / SMA / EMA Lengths
Candle Range Sensitivity
TSL Distance (%)
Profit Target (%)
Loss Limit (%)
Enable/Disable Background Highlights & Labels
Display Fib Zones
⏱️ Best Use Case & Timeframes
Malama's big MACDPurpose: Malama's Big MACD is a multi-faceted Pine Script indicator designed for traders on short timeframes (1-5 minute charts) to identify high-probability trading opportunities. It combines a Stochastic Price Predictor (SPP) with a comprehensive set of technical indicators, including MACD, RSI, moving average crossovers, ATR, volume spikes, and a custom JKH RSI, to generate robust buy and sell signals. The indicator aims to solve the problem of filtering out market noise in fast-moving markets by integrating probability-based predictions with traditional technical analysis, providing traders with clear entry/exit signals, trend visualization, and risk management levels.
Originality and Usefulness
This script is a unique mashup of a Stochastic Price Predictor (SPP) and a comprehensive indicator suite, tailored for short-term trading. The SPP uses a Monte Carlo simulation combined with ATR and Stochastic RSI to forecast price movements, while the comprehensive indicator suite leverages MACD crossovers, RSI overbought/oversold conditions, moving average crossovers, volume spikes, and a custom JKH RSI for confirmation. Unlike standalone MACD or RSI indicators available in TradingView’s public library, this script’s originality lies in its hybrid approach, blending probabilistic forecasting with multiple confirmatory signals to enhance reliability. The integration of user-defined sentiment input and customizable risk management levels further differentiates it from generic open-source alternatives, making it particularly useful for scalpers and day traders seeking precise, actionable signals.
How It Works
The script operates in two primary modules: the Stochastic Price Predictor (SPP) and the Comprehensive Indicator Suite, which work together to generate and confirm trading signals. Signal strength is calculated to quantify the confidence of bullish or bearish conditions.
Stochastic Price Predictor (SPP):
Core Logic: The SPP forecasts price movements using a Monte Carlo simulation based on historical returns, ATR-based volatility, and Stochastic RSI filtering. It calculates the probability of price reaching a user-defined target move (default: 0.3%) within a specified forecast horizon (default: 3 bars).
Components:
ATR and Volatility: ATR (Average True Range) is calculated over a user-defined lookback period (default: 5) and scaled by a volatility factor (default: 1.5) to estimate price volatility. A volatility ratio (current volatility vs. average) filters out signals during extreme volatility (>2x average).
Stochastic RSI: A 7-period RSI is smoothed into a Stochastic RSI (5-period stochastic, 2-period SMA) to identify overbought (>85) or oversold (<15) conditions, preventing signals in extreme market states.
Monte Carlo Simulation: 30 price paths are simulated using a geometric Brownian motion model, incorporating drift (based on weighted moving average of returns) and volatility shocks. The simulation estimates the probability of price reaching the target move up or down.
Signal Generation: A buy signal is triggered if the probability of an upward move exceeds the confidence threshold (default: 65%) and the market is not overbought, with volatility within limits. A sell signal is triggered similarly for downward moves.
Purpose: The SPP provides a probabilistic framework to anticipate short-term price movements, reducing reliance on lagging indicators.
Comprehensive Indicator Suite:
Core Logic: This module combines multiple technical indicators to confirm SPP signals and generate independent signals based on momentum, trend, and volume.
Components:
MACD: Uses fast (5-period) and slow (13-period) EMAs to calculate the MACD line, smoothed by a 5-period signal line. A crossover above a threshold (default: 0.0001) indicates bullish momentum, while a crossunder signals bearish momentum.
RSI: A 14-period RSI identifies overbought (>70) or oversold (<30) conditions to filter signals.
Moving Average Crossovers: Fast (5-period) and slow (20-period) EMAs determine trend direction. A bullish crossover (fast > slow) supports buy signals, while a bearish crossover (fast < slow) supports sell signals.
Volume Spikes: Volume exceeding 2x the 50-period average signals significant market activity, enhancing signal reliability.
JKH RSI: A fast 3-period RSI with custom overbought (>80) and oversold (<20) levels provides additional confirmation, reducing false signals in choppy markets.
Sentiment Input: A user-defined sentiment score (-1 to 1) adjusts signal strength, allowing traders to incorporate external market bias (e.g., news or fundamentals).
Signal Generation: A buy signal requires a bullish MACD crossover, RSI oversold, bullish MA crossover, non-overbought JKH RSI, and neutral/positive sentiment. A sell signal requires the opposite conditions.
Signal Strength Calculation:
Logic: Combines SPP probability, RSI deviation, and MACD strength, weighted at 50%, 30%, and 20%, respectively. Sentiment input scales the final strength (0–100).
Formula:
Bullish strength = min(100, (50 * |prob_up - prob_down| / 100 + 30 * |RSI - 50| / 50 + 20 * |MACD_line| / (0.1 * ATR)) * (1 + max(0, sentiment)))
Bearish strength is calculated similarly, using the absolute negative sentiment.
Purpose: Quantifies signal confidence, helping traders prioritize high-probability setups.
Strategy Results and Risk Management
While the script is primarily an indicator, it provides implied trading signals that assume realistic trading conditions:
Assumptions: Signals are designed for short-term trading (1-5 minute charts) with a minimum of 100 trades for statistical significance. The script assumes typical commission (e.g., 0.1% per trade) and slippage (e.g., 0.05%) for liquid markets. Risk per trade is implicitly capped via ATR-based stop-loss levels (2x ATR below/above entry for buy/sell).
Default Settings:
Lookback (5), volatility factor (1.5), and forecast horizon (3) are optimized for short timeframes.
ATR-based stop-loss and profit target levels (2x ATR) provide a risk-reward ratio of approximately 1:1.
Confidence threshold (65%) balances signal frequency and reliability.
Customization: Traders can adjust the ATR multiplier for stop-loss/profit targets or modify the confidence threshold to increase/decrease signal frequency. Lowering the target move (e.g., to 0.2%) or shortening the forecast horizon (e.g., to 2 bars) can tighten risk parameters for scalping.
Guidance: Traders should backtest signals on their specific asset and timeframe, ensuring sufficient trade volume (>100 trades) and incorporating their broker’s commission/slippage. Risk should be limited to 5–10% of equity per trade, adjustable via ATR multiplier or position sizing outside the script.
User Settings and Customization
The script offers extensive user inputs, organized into three groups:
Stochastic Price Predictor Settings:
Lookback Period (default: 5): Controls the period for ATR and returns calculation. Shorter periods increase sensitivity.
Volatility Factor (default: 1.5): Scales ATR for volatility shocks in the Monte Carlo simulation.
Confidence Threshold (default: 65%): Sets the minimum probability for SPP signals.
Stoch RSI Overbought/Oversold Levels (default: 85/15): Filters signals in extreme conditions.
Forecast Horizon (default: 3): Number of bars for price prediction.
Target Move (default: 0.3%): Expected price movement for probability calculation.
Show Predicted Range (default: false): Toggles visibility of the 25th–75th percentile price range.
Comprehensive Indicator Settings:
RSI Length (default: 14), Overbought (70), Oversold (30): Standard RSI parameters.
ATR Length (default: 14): Period for ATR calculation.
Volume Spike Multiplier (default: 2.0): Threshold for detecting volume spikes.
Sentiment Input (default: 0.0, range: -1 to 1): Scales signal strength based on external bias.
MACD Fast/Slow/Signal Lengths (default: 5/13/5), Crossover Threshold (0.0001): Controls MACD sensitivity.
MA Fast/Slow Lengths (default: 5/20): Defines trend direction.
JKH RSI Length (default: 3), Overbought (80), Oversold (20): Fast RSI for confirmation.
Visual Settings:
Show SPP Signals (default: true): Displays SPP buy/sell labels.
Show Comp Signals (default: true): Displays comprehensive indicator signals.
Highlight Volume Spikes (default: true): Highlights bars with significant volume.
Show ATR Levels (default: true): Plots stop-loss and profit-target lines.
Impact: Adjusting lookback periods or thresholds affects signal frequency and sensitivity. For example, lowering the confidence threshold increases signals but may reduce accuracy, while increasing the volatility factor amplifies price path variability.
Visualizations and Chart Setup
The script plots clear, relevant elements on the chart to aid decision-making:
Trend Line: Plots the close price, colored green (bullish, fast MA > slow MA), red (bearish), or orange (neutral).
SPP Signals: Green "BUY (SPP)" labels below bars and red "SELL (SPP)" labels above bars when conditions are met.
Predicted Range: Optional blue step lines showing the 25th–75th percentile price range from the Monte Carlo simulation, with a semi-transparent fill.
Comprehensive Signals:
Blue upward triangles for bullish MACD crossovers, orange downward triangles for bearish crossovers.
Green circles above bars for RSI overbought, red circles below for oversold.
Green "BUY (Comp)" labels (offset by 1x ATR below) and red "SELL (Comp)" labels (offset by 1x ATR above) for comprehensive signals.
Green upward triangles for bullish MA crossovers, red downward triangles for bearish crossovers.
Volume Spikes: Yellow background highlights bars with volume >2x the 50-period average.
ATR Levels: Purple dotted lines for stop-loss (close - 2x ATR) and profit target (close + 2x ATR).
Moving Averages: Fast MA (blue, 5-period) and slow MA (red, 20-period) for trend reference.
Clarity: Only relevant elements are plotted, ensuring traders can quickly identify trends, signals, and risk levels without clutter.
Adaptive Momentum Flow (AMF)Overview
The Adaptive Momentum Flow (AMF) indicator is a powerful, multi-faceted tool designed to provide a comprehensive and adaptive view of market momentum and trend strength. Unlike traditional oscillators with fixed settings, AMF dynamically adjusts its calculations based on market volatility , ensuring its signals remain relevant across varying market conditions. By combining advanced Double Exponential Moving Averages (DEMA) with a powerful volume analysis component and a customizable scoring system, AMF offers a unique perspective on price action and underlying buying/selling pressure.
Key Features & How It Works
1. Adaptive DEMA Trend Strength:
At its core, AMF utilizes three DEMA lines (Fast, Medium, Slow) to assess the current trend's alignment and strength.
The indicator dynamically adjusts the lengths of these DEMA lines based on real-time market volatility, measured by Average True Range (ATR). This means AMF becomes more responsive in volatile markets and smoother in calmer periods.
A "Volatility Sensitivity" input allows you to fine-tune how aggressively the indicator adapts to these changes.
2. Volume Analysis (Buying/Selling Pressure):
AMF incorporates a dedicated volume analysis module to gauge whether volume is predominantly supporting upward or downward price movements. This helps identify periods of significant buying or selling pressure.
This volume analysis component is smoothed with an adjustable Moving Average (SMA, EMA, WMA, or DEMA) and contributes to the overall momentum score, adding a crucial layer of volume-driven confirmation to the analysis.
3. Comprehensive Scoring System:
The indicator generates a normalized "Oscillator Score" that ranges from -100 to 100. This score is a weighted sum of:
Price's relationship to the Fast DEMA.
The Fast DEMA's relationship to the Medium DEMA.
The Medium DEMA's relationship to the Slow DEMA.
The smoothed value from the volume analysis.
Each component's influence on the final score can be individually adjusted via input weights, allowing for deep customization.
Signal Line & Crossovers:
A smoothed "Signal Line" provides additional confirmation for momentum shifts. Crossovers between the main AMF line and its Signal Line can indicate potential changes in market direction.
Overbought/Oversold Levels:
Adjustable Overbought (default 70) and Oversold (default -70) levels visually highlight extreme momentum conditions.
These zones are enhanced with a color fill effect (bright red for overbought, bright cyan for oversold), making it easy to spot when the market is entering potentially exhausted states.
Crucially, these extreme zones can often be further validated by combining them with volatility bands (like Bollinger Bands or Keltner Channels as shown in the chart above) or other confluence indicators, offering stronger signals for potential reversals or exhaustion.
Benefits for Traders
Reduced Lag: DEMA's inherent design helps minimize lag compared to traditional moving averages, providing more timely signals.
Adaptive Intelligence: Automatically adjusts to market volatility, ensuring the indicator's sensitivity is appropriate for current conditions.
Holistic Momentum View: Combines price-based trend alignment with volume-based pressure for a more robust assessment of market flow.
Clear Visual Cues: Intuitive plots, signal line, and vibrant overbought/oversold zone fills make interpretation straightforward.
Customizable: Extensive input options allow traders to tailor the indicator to their specific trading style, asset, and timeframe.
How to Use
Trend Confirmation: Look for the AMF line and its Signal Line to align with the price trend.
Momentum Shifts: Crossovers between the AMF line and its Signal Line can indicate shifts in momentum.
Extreme Conditions: Pay attention when the AMF line enters the neon-highlighted overbought or oversold zones, signaling potential reversals or pauses in the current momentum. Always consider confirming these signals with other analysis tools, such as price action, chart patterns, support/resistance levels, or volatility indicators.
Customization: Experiment with the "Volatility Sensitivity," DEMA multipliers, and scoring weights to find the optimal settings for your trading strategy.
Sentival | QuantEdgeBIntroducing Sentival by QuantEdgeB.
An Adaptive Multi-Factor Indicator for Market Valuation & Trend Strength
____
Overview
The Sentival Valuation System is a medium-term, multi-factor valuation tool designed to assess market conditions using a combination of momentum, mean reversion, and risk-adjusted metrics. It provides traders and investors with a dynamic score reflecting market valuation, ranging from strongly oversold to strongly overbought conditions.
This system leverages a diverse range of technical indicators, including momentum oscillators, volatility measures, risk ratios, and mean-reversion metrics, providing a holistic view of market conditions.
____
1. Key Features
🛠 Multi-Factor Valuation Model
Sentival aggregates nine different indicators, normalizing and rescaling them into a standardized z-score-based valuation system. The final output represents an average of the selected indicators, allowing for flexible customization based on the user’s preference.
📊 Customizable Indicator Selection
Users can enable or disable any of the nine valuation factors, ensuring the system adapts to different market environments, trading styles, and assets.
🔄 Multi-Timeframe Adaptability
Sentival can be used across different time horizons, making it suitable for short-term mean reversion, medium-term traders, or long-term valuation analysis by simply adjusting the timeframe and indicator settings. This flexibility allows traders to adapt Sentival to various market conditions and trading objectives.
🎨 Intuitive Dashboard & Color Coding
- Dynamic Heatmap & Dashboard: Displays valuation strength across multiple factors.
- Gradient-Based Overbought/Oversold Signals: Clear color-coded signals for easy interpretation.
- Background Highlighting: Optional oversold/overbought background zones.
🏆 Statistical & Risk-Based Insights
- Standardized Rescaling & Z-Score Analysis to prevent bias from individual indicators.
- Risk-Adjusted Metrics such as Sharpe, Sortino, and Omega Ratios help assess the overall market risk appetite.
- Trend Following Mode (TF Display): Users can enable the "Trend Following" option to display the trend direction, helping to align valuation signals with the broader market trend.
____
2. How It Works
Sentival is a multi-factor trend and momentum analysis system, designed to track market cycle shifts using a combination of volatility, momentum, risk assessment, and valuation mechanisms. Instead of focusing on one dimension of the market, Sentival integrates multiple methodologies to cross-validate signals and reduce noise. Each indicator in Sentival plays a specific role, ensuring confirmation across different market conditions.
How Each Component Works Together
1️⃣ Chande Momentum Oscillator (CMO)
• A momentum-based measure that determines whether price action is dominated by upward or downward forces.
• Works well in combination with volatility measures to confirm whether a move is sustainable.
2️⃣ Disparity Index
• Measures the distance between price and its moving average, acting as an overextension filter.
• Ensures that trend-following signals are not driven by short-term spikes but sustained trends.
3️⃣ Bollinger Bands % (BB%)
• A volatility measure that indicates how far price is from the statistical mean.
• Helps identify trend exhaustion points where price moves become unstable.
4️⃣ Relative Strength Index (RSI)
• A trend confirmation layer, ensuring that momentum strength aligns with price movement.
• Adds an additional check to prevent false breakouts.
5️⃣ Rate of Change (RoC)
• Captures the speed of price movement, ensuring that the market has enough momentum for trend continuation.
• Works well with risk indicators to filter weaker moves.
6️⃣ Price Z-Score
• A statistical tool to measure how far price is from its long-term equilibrium.
• Helps prevent entering overstretched trends too late.
7️⃣ Risk Ratios (Sharpe, Sortino, Omega)
• This is the risk-adjusted performance component, ensuring that trends have a healthy risk-reward balance.
• Helps determine when a trend has structurally strong backing rather than speculative movement.
8️⃣ Hurst Cycle Analysis
• Measures the persistence of trends by analyzing price fractals.
• Ensures that the market regime is either trending or mean-reverting, improving trade confidence.
9️⃣ Commodity Channel Index (CCI)
• Helps identify strong trend conditions, adding another layer of momentum confirmation.
• Works well with other oscillators to prevent misreading counter-trends.
🔗 Why These Components Work Well Together
• Momentum + Volatility + Risk → Instead of relying on a single category, Sentival merges multiple dimensions of market behavior into a cohesive signal.
• Filters Out False Signals → Combining momentum oscillators, volatility measures, and risk-adjusted metrics ensures high-confidence entries.
• Adaptability Across Market Regimes → Whether the market is trending, consolidating, or volatile, the system adjusts dynamically.
• Cross-Validation for Trend Strength → If multiple components align, it increases certainty that a trend is real and sustainable.
____
3. Sentival Scanner - table breakdown
The dashboard-style table generated is designed to give traders a holistic market view at a glance. It processes a variety of technical signals and distills them into readable labels, visual strength bars, and actionable trend states. Here's a breakdown of what each section means:
1. Direction
This section analyzes whether the average Z-score (a composite of several indicators) is increasing, decreasing, or neutral over time. It does this using a smoothed trend of the Z-score, comparing recent values to older ones.
2. Momentum
Momentum is derived from the rate of change (RoC) of the average Z-score. It evaluates how strong the current move is. If momentum is above a certain positive threshold, it’s considered positive, if below a negative threshold, it’s negative, otherwise it’s neutral.
3. Impulse
Impulse reflects the velocity of momentum — in other words, is the market speeding up or slowing down? High positive values suggest strong acceleration (strong impulse), while negative values show deceleration or stalling.
4. Drive
This metric combines momentum and velocity to create a descriptive phrase that captures the market’s behavior. For example:
• “Strong Upside” means strong momentum with acceleration.
• “Fading Downside” means bearish momentum losing steam.
• “Neutral” appears when momentum is indecisive.
5. Deviation Distance
This represents how far the market price is from fair value in terms of standard deviation units (σ). It’s calculated using Z-scores and classified as:
• +1σ, +2σ, etc., for overvalued regions.
• −1σ, −2σ, etc., for undervalued areas.
• “At Fair Value” if close to the mean.
6. Bull and Bear Strength Bars
The system computes both bullish and bearish strength, using distance from fair value, the rate of change, and the velocity. These strengths are displayed as progress bars, giving a quick visual cue of conviction. The table labels them as:
• “Bull Conviction” if there's a long bias.
• “Bull Potential” if bullish but undecided.
• “Bear Conviction” or “Bear Potential” for short-side equivalents.
7. Trend Signal
This is a simple label that tells you if the scanner recommends a Long, Short, or Cash (neutral) stance based on threshold logic. It is based on whether the average Z-score crosses above a long threshold or below a short one.
8. Stage
The “Stage” label summarizes the valuation environment based on the composite Z-score:
• Strong Undervalued
• Moderately Undervalued
• Fair Value
• Overvalued, etc.
This stage helps traders know whether they are operating in cheap or expensive territory statistically.
Summary
Overall, this table merges advanced technical signals like momentum, volatility, valuation, and risk into a digestible format that updates dynamically with each bar. The goal is to provide traders with a 360° perspective on market conditions, tailored for both trend-following and mean-reversion strategies.
___________
4. Sentival Valuation Score & Interpretation
🔹 Sentival Score Ranges
- 📉 Strongly Oversold (-2 and below) → Market is extremely undervalued; potential reversal.
- 📉 Moderately Oversold (-1.5 to -2) → Discounted market conditions, buying interest may emerge.
- 📉 Slightly Oversold (-0.5 to -1.5) → Possible accumulation phase.
- ⚖ Fair Value (-0.5 to +0.5) → Market trading at equilibrium.
- 📈 Slightly Overbought (+0.5 to +1.5) → Initial signs of market strength.
- 📈 Moderately Overbought (+1.5 to +2) → Market heating up, caution warranted, selling interest may emerge.
- 📈 Strongly Overbought (+2 and above) → Extreme valuation, increased risk of correction.
This classification helps traders gauge overall market sentiment and make better allocation decisions.
Note: Past valuations and buy/sell signals generated by Sentival do not guarantee future performance. Market conditions can change, and proper risk management should always be applied.
____
5. Use Cases & Applications
🔹 📊 Market Rotation & Asset Allocation
- Used as a valuation model to determine if a market or asset is undervalued or overvalued.
- Rotational strategies can benefit from the valuation score by switching exposure between assets.
🔹 📈 Medium-Term Trend Identification
- Detects overbought and oversold conditions while filtering out short-term noise.
- Can be combined with other trend-following indicators for confluence-based strategies.
🔹 🔄 Mean Reversion & Momentum Trading
- Provides statistical validation for momentum breakouts or mean reversion signals.
- Useful for long-short trading strategies, determining optimal entry & exit points.
____
Conclusion
Sentival is a powerful universal valuation system for traders and investors seeking a data-driven, multi-factor approach to market valuation. With its combination of momentum, trend, risk-adjusted, and mean-reversion indicators, it provides a robust, adaptable, and statistically sound framework for making informed market decisions.
🔹 Who Should Use Sentival?
✅ Swing Traders & Medium-Term Investors looking for structured valuation metrics.
✅ Quantitative & Systematic Traders incorporating multi-factor models.
✅ Portfolio Managers optimizing exposure to different market regimes.
🔹 Disclaimer: Past performance is not indicative of future results. No trading strategy can guarantee success in financial markets.
🔹 Strategic Advice: Always backtest, optimize, and align parameters with your trading objectives and risk tolerance before live trading.
Stochastic RSI with Alerts# Stochastic RSI with Alerts - User Manual
## 1. Overview
This enhanced Stochastic RSI indicator identifies overbought/oversold conditions with visual signals and customizable alerts. It features:
- Dual-line Stoch RSI (K & D)
- Threshold-based buy/sell signals
- Configurable alert system
- Customizable parameters
## 2. Installation
1. Open TradingView chart
2. Open Pine Editor (📈 icon at bottom)
3. Copy/paste the full code
4. Click "Add to Chart"
## 3. Input Parameters
### 3.1 Core Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| K | 3 | Smoothing period for %K line |
| D | 3 | Smoothing period for %D line |
| RSI Length | 14 | RSI calculation period |
| Stochastic Length | 14 | Lookback period for Stoch calculation |
| RSI Source | Close | Price source for RSI calculation |
### 3.2 Signal Thresholds
| Parameter | Default | Description |
|-----------|---------|-------------|
| Upper Limit | 80 | Sell signal threshold (overbought) |
| Lower Limit | 20 | Buy signal threshold (oversold) |
### 3.3 Alert Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| Enable Buy Alerts | True | Toggle buy notifications |
| Enable Sell Alerts | True | Toggle sell notifications |
| Custom Alert Message | Empty | Additional text for alerts |
## 4. Signal Logic
### 4.1 Buy Signal (Green ▲)
Triggers when:
\text{%K crossover %D} \quad AND \quad (\text{%K ≤ Lower Limit} \quad OR \quad \text{%D ≤ Lower Limit})
### 4.2 Sell Signal (Red ▼)
Triggers when:
\text{%K crossunder %D} \quad AND \quad (\text{%K ≥ Upper Limit} \quad OR \quad \text{%D ≥ Upper Limit})
## 5. Alert System
### 5.1 Auto-Generated Alerts
The script automatically creates these alert conditions:
- **Buy Signal Alert**: Triggers on valid buy signals
- **Sell Signal Alert**: Triggers on valid sell signals
Alert messages include:
- Signal type (Buy/Sell)
- Current %K and %D values
- Custom message (if configured)
### 5.2 Alert Configuration
**Method 1: Script-Generated Alerts**
1. Hover over any signal marker
2. Click the 🔔 icon
3. Select trigger conditions:
- "Buy Signal Alert"
- "Sell Signal Alert"
**Method 2: Manual Setup**
1. Open Alert creation window
2. Condition: Select "Stoch RSI Alerts"
3. Choose:
- "Buy Signal Alert" for long entries
- "Sell Signal Alert" for exits/shorts
## 6. Customization Tips
### 6.1 Threshold Adjustment
// For day trading (tighter ranges)
upperLimit = 75
lowerLimit = 25
// For swing trading (wider ranges)
upperLimit = 85
lowerLimit = 15
### 6.2 Visual Modifications
Change signal markers via:
- `style=` : Try `shape.labelup`, `shape.flag`, etc.
- `color=` : Use hex codes (#FF00FF) or named colors
- `size=` : `size.tiny` to `size.huge`
## 7. Recommended Use Cases
1. **Mean Reversion Strategies**: Pair with support/resistance levels
2. **Trend Confirmation**: Filter with 200EMA direction
3. **Divergence Trading**: Compare with price action
## 8. Limitations
- Works best in ranging markets
- Combine with volume analysis for confirmation
- Not recommended as standalone strategy
---
This documentation follows technical writing best practices with:
- Clear parameter tables
- Mathematical signal logic
- Visual hierarchy
- Practical examples
- Usage recommendations
TrendFlow Dynamics V.1.3 [Afnan_YP]The "TrendFlow Dynamics V.1.2 " indicator is a powerful tool designed to analyze price charts in financial markets. It is built to provide comprehensive functionality for trend analysis, support and resistance levels, and buy/sell signals, helping users make more informed trading decisions. The main functions of this indicator are as follows:
---
1. Trend Detection
- Detects real-time uptrends and downtrends in price movements.
- Displays trends by changing the color of the chart bars:
- Specific bar colors for uptrends (UP Trend).
- Specific bar colors for downtrends (Down Trend).
- Supports trend shifts when price breaks support or resistance levels.
- Enables users to easily grasp the overall market direction at a glance.
---
2. Support and Resistance Levels
- Automatically identifies dynamic support and resistance levels:
- Support indicates areas where price is likely to stop falling.
- Resistance indicates areas where price is likely to stop rising.
- Lines for support and resistance are updated dynamically with market movements.
- Fully customizable, including line color, thickness, and style (solid, dotted, dashed).
- Enhances precision in planning entry and exit strategies.
---
3. Buy/Sell Signals
- Generates buy and sell signals based on predefined price movement conditions.
- Displays symbols on the chart to clearly indicate Buy and Sell points.
- Includes signal filtering to reduce risks in sideways or non-trending markets.
---
4. Alerts
- Provides alert notifications when buy or sell signals are generated.
- Configurable to send alerts through the TradingView app, ensuring no trading opportunities are missed.
- Ideal for users who want to monitor the market without constantly watching the screen.
---
5. Price Level Evaluation (Indicator Zones)
- Identifies zones where price is in an "Overbought" or "Oversold" condition.
- Highlights potential buy opportunities when the price enters an Oversold zone and sell opportunities when it enters an Overbought zone.
- Supports customizable thresholds and conditions for entering or exiting these zones.
---
6. Flexible Customization
- Offers a wide range of customizable parameters, such as:
- Trend calculation period (Pivot Length).
- Levels for buy and sell zones to filter false signals.
- Sensitivity of trend detection.
- Customization of bar colors, support/resistance lines, and signal display.
- Adaptable to suit individual trading styles and strategies.
---
7. Trend Filtering
- Incorporates filters to detect the strength of market trends.
- Reduces the risk of signals occurring during non-trending or sideways markets.
- Filters can be toggled on or off according to user preference.
---
8. Clear and User-Friendly Visualization
- Displays buy/sell signals and support/resistance levels in real-time on the chart.
- Designed for clear and intuitive presentation, suitable for traders of all experience levels.
---
Summary
This indicator is ideal for traders seeking an all-in-one market analysis tool. It offers trend analysis, support and resistance identification, buy/sell signal generation, and alert notifications. It is suitable for both beginners and professional traders who want to enhance their trading precision.
[blackcat] L2 Angle Trend TrackerOVERVIEW
The " L2 Angle Trend Tracker" is a sophisticated technical analysis tool designed to monitor trend direction and momentum using multiple Exponential Moving Averages (EMAs) with different periods. 📈 This script calculates the angles of 5 EMAs (5, 8, 10, 12, and 15 periods) and displays them with gradient colors, providing a comprehensive view of market momentum. When all EMAs cross above or below specified threshold levels, it generates Buy or Sell signals with visual alerts. The indicator helps traders identify trend reversals, potential entry/exit points, and market sentiment shifts with precision. 🚀 This powerful tool is particularly useful for traders who want to combine multiple timeframe analysis with angle-based momentum confirmation.
FEATURES
Calculates angles for 5 EMAs with customizable periods (5, 8, 10, 12, and 15)
Displays angle values with distinct colors for each EMA (Green, Blue, Purple, Orange, and Red)
Generates Buy signals when all EMAs cross above the lower threshold
Generates Sell signals when all EMAs cross below the upper threshold
Shows a zero line and threshold lines for easy reference
Customizable threshold levels for Buy/Sell signals
Visual alerts with "Buy" and "Sell" labels at the point of signal generation
The script uses a mathematical formula to calculate the angle of each EMA relative to its position 11 bars ago
Angle values are converted from radians to degrees for easier interpretation
The zero line represents no change in the EMA angle
The indicator is not overlayed on the price chart by default, but can be adjusted in the script settings 📊
HOW TO USE
Adjust the EMA periods to match your trading strategy 🛠️
Shorter periods (5, 8) are more sensitive to price changes
Longer periods (10, 12, 15) provide smoother trend confirmation
Set appropriate threshold values for Buy/Sell signals based on your risk tolerance
Default thresholds are 70 for upper threshold and -70 for lower threshold
Consider adjusting thresholds based on market volatility
Watch for Buy signals when all EMAs cross above the lower threshold (default: -70)
The signal appears as a green "Buy" label on the chart
This indicates a potential trend reversal to the upside
Watch for Sell signals when all EMAs cross below the upper threshold (default: 70)
The signal appears as a red "Sell" label on the chart
This indicates a potential trend reversal to the downside
Combine with other indicators for confirmation before making trading decisions 🧠
Consider using volume confirmation, support/resistance levels, or other oscillators
The angle tracker works well with trend-following strategies
Use the angle values to gauge momentum strength
Steeper angles indicate stronger momentum
Flatter angles suggest weakening momentum or consolidation
CONFIGURATION
EMA Periods: The script uses five different EMA periods that can be customized:
EMA Period 5: Short-term trend indicator
EMA Period 8: Medium-short term trend indicator
EMA Period 10: Medium-term trend indicator
EMA Period 12: Medium-long term trend indicator
EMA Period 15: Long-term trend indicator
Threshold Settings:
Threshold Top: Sets the upper boundary for Sell signals (default: 70)
Threshold Bot: Sets the lower boundary for Buy signals (default: -70)
These thresholds can be adjusted based on market conditions and trading style
LIMITATIONS
The script may generate false signals in ranging markets or during periods of high volatility
All EMAs must cross the threshold for a signal to appear, which may filter some valid signals
The angle calculation uses a 11-bar lookback period, which may not be suitable for all timeframes
Works best in trending markets and may produce whipsaws in choppy conditions ⚠️
The indicator is more effective on higher timeframes (4H, 1D) than on very short timeframes (1M, 5M)
Signal generation requires confirmation from multiple EMAs, which may delay entry/exit points
The angle calculation method may not be suitable for all financial instruments
ADVANCED TIPS
Use multiple instances of this indicator with different EMA settings for multi-timeframe analysis
Combine with volume analysis to confirm the strength of signals
Look for confluence with support and resistance levels for more reliable signals
Consider using the angle values as a filter for other trading strategies
The indicator can be used to identify momentum exhaustion points when angles flatten
For swing trading, consider using the Buy and Sell signals as potential entry/exit points
For day trading, you may want to use shorter EMA periods and adjust threshold values accordingly
NOTES
The script uses a mathematical formula to calculate the angle of each EMA relative to its position 11 bars ago
The angle values are converted from radians to degrees for easier interpretation
The zero line represents no change in the EMA angle
The indicator is not overlayed on the price chart by default, but can be adjusted in the script settings 📊
The angle calculation provides a dynamic view of momentum that traditional moving averages don't offer
The threshold values are based on empirical testing and can be fine-tuned for specific instruments
THANKS
Special thanks to the TradingView community for their support and feedback on this indicator. If you find this script helpful, please consider leaving a comment or sharing your experiences with it. Your feedback helps improve the tool for everyone. 🙏
Also, a nod to the original concept developers who pioneered angle-based trend analysis. This script builds upon those foundational ideas to provide a more comprehensive view of market momentum. 🌟
[blackcat] L2 Multi-Level Price Condition TrackerOVERVIEW
The L2 Multi-Level Price Condition Tracker represents an innovative approach to analyzing financial markets by simultaneously monitoring multiple price levels, thus providing traders with a holistic view of market dynamics. By combining dynamic calculations based on moving averages and price deviations, this tool aims to deliver precise and actionable insights into potential entry and exit points. It leverages sophisticated statistical measures to identify key thresholds that signify shifts in market sentiment, thereby aiding traders in making well-informed decisions. 🎯
Key benefits encompass:
• Comprehensive calculation of midpoints and average prices indicating short-term trend directions.
• Interactive visualization elements enhancing interpretability effortlessly.
• Real-time generation of buy/sell signals driven by precise condition evaluations.
TECHNICAL ANALYSIS COMPONENTS
📉 Midpoint Calculations:
Computes central reference points derived from high-low ranges establishing baseline supports/resistances.
Utilizes Simple Moving Averages (SMAs) along with standardized deviation formulas smoothing out volatility while preserving long-term trends accurately.
Facilitates identification of directional biases reflecting underlying market forces dynamically.
🕵️♂️ Advanced Price Level Detection:
Derives upper/lower bounds adjusting sensitivities adaptively responding to changing conditions flexibly.
Employs proprietary logic distinguishing between bullish/bearish sentiments promptly signaling transitions effectively.
Ensures consistent adherence to predefined statistical protocols maintaining accuracy robustly.
🎥 Dynamic Signal Generation:
Detects crossovers indicating dominance shifts between buyers/sellers promptly triggering timely alerts.
Integrates conditional logic reinforcing signal validity minimizing erroneous activations systematically.
Supports adaptive thresholds tuning sensitivities based on evolving market conditions flexibly accommodating varying scenarios.
INDICATOR FUNCTIONALITY
🔢 Core Algorithms:
Utilizes moving averages alongside standardized deviation formulas generating precise net volume measurements.
Implements Arithmetic Mean Line Algorithm (AMLA) smoothing techniques improving interpretability.
Ensures consistent alignment with established statistical principles preserving fidelity.
🖱️ User Interface Elements:
Dedicated plots displaying real-time midpoint markers facilitating swift decision-making.
Context-sensitive color coding distinguishing positive/negative deviations intuitively highlighting key activations clearly.
Background shading emphasizing proximity to crucial threshold activations enhancing visibility focusing attention on vital signals promptly.
STRATEGY IMPLEMENTATION
✅ Entry Conditions:
Confirm bullish/bearish setups validated through multiple confirmatory signals assessing concurrent market sentiment factors.
Validate entry decisions considering alignment between calculated midpoints and broader trend directions ensuring coherence.
Monitor cumulative breaches signifying potential trend reversals executing partial/total closes contingent upon predetermined loss limits preserving capital efficiently.
🚫 Exit Mechanisms:
Trigger exits upon hitting predefined thresholds derived from historical analyses promptly executing closures.
Execute partial/total closes contingent upon cumulative loss limits preserving capital efficiently managing exposures prudently.
Conduct periodic reviews gauging strategy effectiveness rigorously identifying areas needing refinement implementing corrective actions iteratively enhancing performance metrics steadily.
PARAMETER CONFIGURATIONS
🎯 Optimization Guidelines:
Lookback Period: Governs responsiveness versus stability balancing sensitivity/stability governing moving averages aligning with preferred granularity.
Price Source: Dictates primary data series driving volume calculations selecting relevant inputs accurately tailoring strategies accordingly.
💬 Customization Recommendations:
Commence with baseline defaults; iteratively refine parameters isolating individual impacts evaluating adjustments independently prior to combined modifications minimizing disruptions.
Prioritize minimizing erroneous trigger occurrences first optimizing signal fidelity sustaining balanced risk-reward profiles irrespective of chosen settings upholding disciplined approaches preserving capital efficiently.
ADVANCED RISK MANAGEMENT
🛡️ Proactive Risk Mitigation Techniques:
Enforce strict compliance with pre-defined maximum leverage constraints adhering strictly to guidelines managing exposures prudently.
Mandatorily apply trailing stop-loss orders conforming to script outputs enforcing discipline rigorously preventing adverse consequences.
Allocate positions proportionately relative to available capital reserves conducting periodic reviews gauging effectiveness continuously identifying improvement opportunities steadily.
⚠️ Potential Pitfalls & Solutions:
Address frequent violations arising during heightened volatility phases necessitating manual interventions judiciously preparing contingency plans proactively mitigating risks effectively.
Manage false alerts warranting immediate attention avoiding adverse consequences systematically implementing corrective actions reliably.
Prepare proactive responses amid adverse movements ensuring seamless functionality amidst fluctuating conditions fortifying resilience against anomalies robustly.
PERFORMANCE MONITORING METRICS
🔍 Evaluation Criteria:
Assess win percentages consistently across diverse trading instruments gauging reliability measuring profitability efficiency accurately evaluating downside risks comprehensively uncovering systematic biases potentially skewing outcomes.
Calculate average profit ratios per successful execution benchmarking actual vs expected performances documenting results meticulously tracking progress dynamically addressing identified shortcomings proactively fostering continuous improvements.
📈 Historical Data Analysis Tools:
Maintain detailed logs capturing every triggered event recording realized profits/losses comparing simulated projections accurately identifying discrepancies warranting investigation implementing iterative refinements steadily enhancing performance metrics progressively.
Identify recurrent systematic errors demanding corrective actions implementing iterative refinements steadily addressing identified shortcomings proactively fostering continuous enhancements dynamically improving robustness resiliently.
PROBLEM SOLVING ADVICE
🔧 Frequent Encountered Challenges:
Unpredictable behaviors emerging within thinly traded markets requiring filtration processes enhancing signal integrity excluding low-liquidity assets prone to erratic movements effectively.
Latency issues manifesting during abrupt price fluctuations causing missed opportunities introducing buffer intervals safeguarding major news/event impacts mitigating distortions seamlessly verifying reliable connections ensuring uninterrupted data flows guaranteeing accurate interpretations dependably.
💡 Effective Resolution Pathways:
Limit ongoing optimization attempts preventing model degradation maintaining optimal performance levels consistently recalibrating parameters periodically adapting strategies flexibly responding appropriately amidst varying conditions dynamically improving robustness resiliently.
Verify reliable connections ensuring uninterrupted data flows guaranteeing accurate interpretations dependably bolstering overall efficacy systematically addressing identified shortcomings dynamically fostering continuous advancements.
THANKS
Heartfelt acknowledgment extends to all developers contributing invaluable insights regarding multi-level price condition-based trading methodologies! ✨
Orderflow Pro+Description:
OrderFlow Pro+ is an advanced volume analysis tool designed to detect absorption events in market data. This professional tool identifies when significant trading volume occurs with minimal price movement, indicating potential support or resistance levels. The indicator uses statistical methods to establish dynamic volume thresholds, allowing it to adapt to different market conditions. OrderFlow Pro+ classifies absorption events as either bid or ask absorption, visualizes them with customizable highlighting, and identifies recurring patterns to form absorption zones. The tool includes a trend analysis component that evaluates the balance between bid and ask absorption over a configurable lookback period, providing users with insights into the dominant market force. With adjustable confidence levels, volume divisors, and visualization options, OrderFlow Pro+ delivers actionable order flow intelligence suitable for various purposes and timeframes.
Key Features:
Absorption Detection: Identifies when significant volume is absorbed at specific price levels with minimal price movement
Volume Analysis: Dynamically calculates volume thresholds based on statistical methods to filter meaningful readings.
Absorption Zones: Visualizes areas where multiple absorption events occur, potentially indicating strong support/resistance
Trend Assessment: Provides absorption trend readings to gauge market bias direction
Customizable Sensitivity: Adjust confidence levels for conservative, balanced, or aggressive signal detection
Visual Alerts: Optional alerts for bid/ask absorption events and significant trend changes
Benefits:
Gain deeper insights into market structure through volume behaviour analysis
Identify potential reversal zones where large orders are being absorbed
Understand the strength of buying and selling pressure
Make more informed entries and exits based on orderflow dynamics
Complement your existing technical analysis with volume-price relationship data
Disclaimer: Orderflow Pro+ is developed with a purpose and goal to understand and decode market movements for learning and informative purposes but does not generate any buy/sell/hold signals and it does not provide any target price. It is not shared with an aim to induce or encourage trading/investing but with a goal to enhance a user's understanding of markets. Trading/Investing are risky endeavours with risk of partial or complete erosion of capital. Please consult a registered financial advisor before venturing into trading/investing
UT Bot + Hull MA Confirmed Signal DelayOverview
This indicator is designed to detect high-probability reversal entry signals by combining "UT Bot Alerts" (UT Bot Alerts script adapted from QuantNomad - Originally developed by Yo_adriiiiaan and idea of original code for "UT Bot Alerts" from HPotter ) with confirmation from a Hull Moving Average (HMA) Developed by Alan Hull . It focuses on capturing momentum shifts that often precede trend reversals, helping traders identify potential entry points while filtering out false signals.
🔍 How It Works
This strategy operates in two stages:
1. UT Bot Momentum Trigger
The foundation of this script is the "UT Bot Alerts" , which uses an ATR-based trailing stop to detect momentum changes. Specifically:
The script calculates a dynamic stop level based on the Average True Range (ATR) multiplied by a user-defined sensitivity factor (Key Value).
When price closes above this trailing stop and the short-term EMA crosses above the stop, a potential buy setup is triggered.
Conversely, when price closes below the trailing stop and the short-term EMA crosses below, a potential sell setup is triggered.
These UT Bot alerts are designed to identify the initial shift in market direction, acting as the first filter in the signal process.
2. Hull MA Confirmation
To reduce noise and false triggers from the UT Bot alone, this script delays the entry signal until price confirms the move by crossing the Hull Moving Average (or its variants: HMA, THMA, EHMA) in the same direction as the UT Bot trigger:
A Buy Signal is generated only when:
A UT Bot Buy condition is active, and
The price closes above the Hull MA.
Or, if a UT Bot Buy condition was recently triggered but price hadn’t yet crossed above the Hull MA, a delayed buy is signaled when price finally breaks above it.
A Sell Signal is generated only when:
A UT Bot Sell condition is active, and
The price closes below the Hull MA.
Similarly, a delayed sell signal can occur if price breaks below the Hull MA shortly after a UT Bot Sell trigger.
This dual-confirmation process helps traders avoid premature entries and improves the reliability of reversal signals.
📈 Best Use Cases
Reversal Trading: This strategy is particularly well-suited for catching early trend reversals rather than trend continuations. It excels at identifying momentum pivots that occur after pullbacks or exhaustion moves.
Heikin Ashi Charts Recommended: The script offers a Heikin Ashi mode for smoothing out noise and enhancing visual clarity. Using Heikin Ashi candles can further reduce whipsaws and highlight cleaner shifts in trend direction.
MACD Alignment: For best results, trade in the direction of the MACD trend or use it as a filter to avoid counter-trend trades.
⚠️ Important Notes
Entry Signals Only: This indicator only plots entry points (Buy and Sell signals). It does not define exit strategies, so users should manage trades manually using trailing stops, profit targets, or other exit indicators.
No Signal = No Confirmation: You may see a UT Bot trigger without a corresponding Buy/Sell signal. This means the price did not confirm the move by crossing the Hull MA, and therefore the setup was considered too weak or incomplete.
⚙️ Customization
UT Bot Sensitivity: Adjust the “Key Value” and “ATR Period” to make the UT Bot more or less reactive to price action.
Use Heikin Ashi: Toggle between standard candles or Heikin Ashi in the indicator settings for a smoother trading experience.
The HMA length may also be modified in the indicator settings from its standard 55 length to increase or decrease the sensitivity of signal.
This strategy is best used by traders looking for a structured, logic-based way to enter early into reversals with added confirmation to reduce risk. By combining two independent systems—momentum detection (UT Bot) and trend confirmation (Hull MA)—it aims to provide high-confidence entries without overwhelming complexity.
Let the indicator guide your entries—you manage the exits.
Examples of use:
Futures:
Stock:
Crypto:
As shown in the snapshots this strategy, like most, works the best when price action has a sizeable ATR and works the least when price is choppy. Therefore it is always best to use this system when price is coming off known support or resistance levels and when it is seen to respect short term EMA's like the 9 or 15.
My personal preference to use this system is for day trading on a 3 or 5 minute chart. But it is valid for all timeframes and simply marks a high probability for a new trend to form.
Sources:
Quant Nomad - www.tradingview.com
Yo_adriiiiaan - www.tradingview.com
HPotter - www.tradingview.com
Hull Moving Average - alanhull.com
Rube Goldberg Top/Bottom Finder [theUltimator5]This is what I call the Rube Goldberg Top and Bottom Finder. It is an overly complex method of plotting a simple buy or sell label on a chart.
I utilize several standard TA techniques along with several of my own to try and locate ideal Buy/Sell conditions. I came up with the name because there are way too many conditional variables to come up with a single buy or sell condition, when most standard indicators use simple crossovers or levels.
There are two unique triggers that are calculated using completely independent techniques. If both triggers turn true within a small timeframe between each other, the buy/sell trigger turns true and plots a "buy" or "sell" label on the chart.
This indicator was designed to be fully functioning out of the box and can be customized only if the user wishes to. It is effective on all timeframes, but longer timeframes (daily +) may require signal length adjustment for best results.
imgur.com
The signals used in the leading trigger are as follows:
(1)RSI
The user can select among any of the following moving averages (base is EMA) (#3) , and have an RSI generated at a user defined length (base is 14). (#4)
SMA, EMA, DEMA, TEMA, WMA, VWMA, SMMA, HMA, LSMA, ALMA
The user can select whether or not the RSI is filtered with the following options:
None, Kalman, Double EMA, ALMA
The filter conditions are hard coded to minimize the amount of selections that the user is required to make to reduce the user interface complexity.
The user can define overbought (base 70) and oversold (base 30) conditions. (#2)
When the RSI crosses above or below the threshold values, the plot will turn red. This creates condition 1 of the leading trigger.
(2) ADX and DI
This portion of the indicator is a derivative of my ADX Divergence and Gap Monitor indicator.
This technique looks at the ADX value as well as for spikes in either +DI or -DI for large divergences. When the ADX reaches a certain threshold and also outpaces a preset ADX moving average, this creates condition 2 of the leading trigger.
There is an additional built-in functionality in this portion of the indicator that looks for gaps. It triggers when the ADX is below a certain threshold value and either the +DI or -DI spike above a certain threshold value, indicating a sudden gap in price after a period of low volatility.
The user can set whether or nor to show when a gap appears on the chart or as a label on the plot below the chart (disabled by default) . If the user chooses to overlay gaps on the chart, it creates a horizontal fill showing the starting point of the gap. The theory here is that the price will return at some point in the near future to the starting point of the gap.
imgur.com
(3) DI based Multi-Symbol reference and divergence
Part of the script computes both the +DI (positive directional index) and -DI (negative directional index) for the currently selected chart symbol and three reference symbols.
The averaged directional move of the reference symbols are compared to the current ticker on your chart and if the divergence exceeds a certain threshold, then the third condition of the trigger is met.
The components that are referenced are based on what stock/chart you are looking at. The script automatically detects if you are looking at a crypto, and uses a user selectable toggle between Large Cap or Small Cap. (#1) The threshold levels are determined by the asset type and market cap.
The leading trigger highlights under several conditions:
1) All (3) portions of the trigger result in true simultaneously
OR
2) Any of triggers 2 or 3 reach a certain threshold that indicates extreme market/price divergence as well as trigger 1 being overbought or oversold.
AND
3) If the trigger didn't highlight
For the lagging part of the trigger:
The lagging trigger is used as a confirmation after the leading trigger to indicate a possible optimized entry/exit point. It can also be used by itself, as well as the leading indicator.
The lagging indicator utilizes the parabolic Stop And Reverse (SAR). It utilizes the RSI length that is defined in portion 1 of the leading trigger as well as the overbought and oversold thresholds. I have found excellent results in catching reversals because it catches rate-of-change events rather than price reversals alone.
imgur.com
When both the leading triggers FOLLOWED BY the lagging trigger result in true within a user defined timeframe, then the buy or sell trigger results in true, plotting a label on the chart.
All portions of the leading and lagging indicators can be toggled on or off, but most of them are toggled off by default in order to reduce noise on the plot.
imgur.com
The leading, lagging, and buy/sell triggers each have built-in alerts that can be toggled on or off in the alert menu.
I have an optional built-in toggle to show green or red dots on the RSI line using two separate RSI lengths that are amplified and plot based on RSI divergence and strength. This can be used as a visual confirmation (or rejection) against the chart overlay plots.
imgur.com
This indicator is not a strategy, so there are no built-in exits or stop losses.